.cascader {
  width: 100% !important;
}

.cascaderDisbaled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search {
  :global {
    .ant-cascader-menu-item {
      width: auto;
      .ant-cascader-menu-item-keyword {
        color: var(--primaryColor);
        font-weight: bold;
      }
    }
  }
}

.mobileCascaderText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 4px;
  width: 100%;
}

.cascaderHeader {
  display: flex;
  .cascaderHeaderItem {
    width: 160px;
    padding-left: 14px;
    line-height: 32px;
    font-weight: bold;
  }
}

.closeBtn {
  svg {
    fill: var(--textCommonTertiary);
  }
  &:hover {
    background-color: var(--bgBglessHover) !important;
  }
  &:active {
    background-color: var(--bgBglessActive) !important;
  }
}

.emptyPlaceholder {
  text-align: center;
  padding: 32px 16px;

  .img {
    width: 160px;
    height: 120px;
  }

  .title {
    font-size: 14px;
    color: var(--secondLevelText);
    margin-top: 8px;
  }
}
:global {
  .ant-select-selection-placeholder {
    padding-left: 8px;
    display: flex;
    align-items: center;
  }
  .ant-select-clear {
    background-color: transparent !important;
    transform: translate(-50%, 0);
    top: 12px !important;
  }

  .ant-select-selector {
    height: 100% !important;
  }

  .ant-cascader {
    .ant-select-selection-search {
      input {
        height: 100% !important;
      }
    }
  }
  
  .ant-cascader-menu-item {
    width: 144px;
    margin: 2px 8px;
    border-radius: 4px;
    &:hover {
      background-color: var(--bgBglessHover) !important;
      color: var(--textBrandDefault);
      svg {
        fill: var(--textBrandDefault);
      }
    }
    &-active {
      background-color: var(--bgBrandLightDefault) !important;
    }
    &-content {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      .emptyPlaceholder {
        width: 160px;
        padding: 0;
      }
    }
  }

  .ant-select-selector .ant-select-selection-item {
    color: var(--firstLevelText) !important;
    line-height: 30px !important;
    font-size: 13px;
  }

  .adm-popup-body {
    border-radius: 16px 16px 0 0;
  }
  .adm-list-item {
    background-color: var(--defaultBg);
    border-bottom: 1px solid var(--lineColor);
  }
  a.adm-list-item:active:not(.adm-list-item-disabled) {
    background-color: var(--bgCommonDefault);
  }
  .adm-list-item-content-main {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  .adm-list-body {
    background-color: transparent;
  }
  .adm-tabs-header {
    border-color: var(--lineColor);
  }
  .adm-cascader-header {
    & > .adm-cascader-header-button:first-child {
      color: var(--secondLevelText);
    }
  }
  .adm-cascader-header-title {
    color: var(--primaryColor);
    text-align: inherit;
   .adm-cascader-header-button {
      color: var(--secondLevelText);
    }
  }
  .adm-tabs-tab-active,
  .adm-cascader-view-item-active,
  .adm-check-list-item-extra {
    color: var(--primaryColor);
  }
  .adm-tabs-tab-line {
    background-color: var(--primaryColor);
  }
  .adm-tabs-header-mask-left,
  .adm-tabs-header-mask-right {
    background: unset;
  }

  @media screen and (max-width: 768px) {
    .ant-cascader-menu {
      min-width: auto !important;
    }
    .ant-cascader-menu-item {
      width: 64px;
      padding: 0 !important;
      margin: 2px 4px !important;
      .ant-cascader-menu-item-content {
        font-size: 12px;
      }
    }
  }
}